#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def hanno(n, a, b, c):
    if n == 1:
        print('move ' + a + ' --------> ' + c)
    else:
        hanno(n - 1, a, c, b)
        hanno(1, a, b, c)
        hanno(n - 1, b, a, c)


# hanno(3, 'a', 'b', 'c')
hanno(4, 'a', 'b', 'c')
